package com.qf.joint.service.impl;

import com.qf.joint.dao.CompanyDao;
import com.qf.joint.pojo.Company;
import com.qf.joint.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Zhy
 * Date on 2020/9/17  13:47
 * @description
 */
@Service("companyService")
public class CompanyServiceImpl implements CompanyService {
    @Autowired
    private CompanyDao companyDao;

    @Override
    public int selectCount() {
        return companyDao.selectCount();
    }

    @Override
    public Company findById(int cid) {
        return companyDao.selectById(cid);
    }

    @Override
    public List<Company> selectAll() {
        return companyDao.selectAll();
    }

    @Override
    public List<Company> selectByCon(String condition) {
        return companyDao.selectByCon(condition);
    }

    @Override
    public int insertOne(Company company) {
        return companyDao.insertOne(company);
    }

    @Override
    public int updateOne(Company company) {
        return companyDao.updateOne(company);
    }

    @Override
    public int deleteOne(int id) {
        return companyDao.deleteOne(id);
    }
}
